home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.04 Apr 97 / OpenDocExtentions / ImagePart / _SOM_ / som_ImagePart.cpp next >
Encoding:
Text File  |  1996-06-19  |  24.3 KB  |  820 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        som_ImagePart.cpp
  3.  
  4.     Contains:    Sample Part's SOM based part public interface implementation
  5.  
  6.     Written by:    Steve Smith
  7.     
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.     
  10.     ----------------------------------------------------------------
  11.     
  12.     Notes:        ImagePart is implemented using a "wrapped" class strategy.
  13.                 This means that the SOM class is just a smart delegator and
  14.                 the real implementation lives in a C++ class. The reason for
  15.                 doing this is twofold. First, this strategy all but elimintates
  16.                 the need for you to have to modify the IDL file and run the
  17.                 SOM compiler/emitter. Secondly, given that all code changes
  18.                 will occur in the C++ class, build turn around time is reduced
  19.                 to however fast the compiler can crunch code.
  20.                 
  21.                 This is not to say that implementing pure SOM classes isn't
  22.                 possible, nor necessary. There will be objects (ie. Extensions)
  23.                 which need to be exported for other parts to use which will need
  24.                 to be written in IDL and SOM implementation files.
  25. */
  26.  
  27. // Notification that this is a SOM source file
  28. #define KSS_som_ImagePart_Class_Source
  29.  
  30. // define underscore field names (ie. _fSelf)
  31. #define VARIABLE_MACROS
  32.  
  33. // -- Compiler/Preprocessor Switches --
  34.  
  35. #ifndef _COMPILERDEFS_
  36. #include "CompDefs.h"
  37. #endif
  38.  
  39. // -- OpenDoc Utilities --
  40.  
  41. #ifndef _EXCEPT_
  42. // Exceptions define several important macros (ie. CHECKENV)
  43. // which are used in the SOM method dispatch glue. If Except.h
  44. // is not included early enough, exceptions may not be thrown
  45. // correctly when returning from a SOM method with the "ev" parameter set.
  46. #include <Except.h>
  47. #endif
  48.  
  49. // -- ImagePart Includes --
  50.  
  51. #ifndef SOM_KSS_som_ImagePart_xih
  52. #include "som_ImagePart.xih"
  53. #endif
  54.  
  55. #ifndef _IMAGEPART_
  56. #include "ImagePart.h"
  57. #endif
  58.  
  59. #ifndef _IMAGEPARTDEF_
  60. #include "ImagePartDef.h"
  61. #endif
  62.  
  63. // -- OpenDoc Includes --
  64.  
  65. #ifndef _ODTYPES_
  66. #include <ODTypes.h>
  67. #endif
  68.  
  69. #ifndef SOM_ODPart_xh
  70. #include <Part.xh>
  71. #endif
  72.  
  73. #pragma segment somImagePart
  74.  
  75. //====================================================================
  76. // som_ImagePart
  77. //====================================================================
  78.  
  79. SOM_Scope void  SOMLINK som_ImagePart__somInit(KSS_som_ImagePart *somSelf)
  80. {
  81.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  82.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__somInit");
  83.  
  84.     // somInit and somUninit methods behave like C++ constructors in that the
  85.     // inherited methods are called automatically. Thus, there is no need to
  86.     // call the parent class' somInit or somUninit.
  87.     
  88.     // There is also no need to set instance variables to zero/NULL
  89.     // since SOM guarantees that a newly constructed object is zeroed.
  90.     
  91.     // Lastly, it is not valid to perform any operation here which may throw
  92.     // an exception.
  93. }
  94.  
  95. SOM_Scope void  SOMLINK som_ImagePart__somUninit(KSS_som_ImagePart *somSelf)
  96. {
  97.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  98.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__somUninit");
  99.  
  100.     delete _fPart;
  101. }
  102.  
  103. SOM_Scope void  SOMLINK som_ImagePart__InitPart(KSS_som_ImagePart *somSelf, Environment *ev,
  104.         ODStorageUnit* storageUnit,
  105.         ODPart* partWrapper)
  106. {
  107.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  108.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__InitPart");
  109.  
  110.     SOM_TRY
  111.         // Create the real C++ ImagePart.        
  112.         _fPart = new ImagePart;
  113.  
  114.         KSS_som_ImagePart_parent_ODPart_InitPart(somSelf,ev,storageUnit,partWrapper);
  115.         _fPart->InitPart(ev,storageUnit,partWrapper);
  116.     SOM_CATCH_ALL
  117.     SOM_ENDTRY
  118. }
  119.  
  120. SOM_Scope void  SOMLINK som_ImagePart__InitPartFromStorage(KSS_som_ImagePart *somSelf, Environment *ev,
  121.         ODStorageUnit* storageUnit,
  122.         ODPart* partWrapper)
  123. {
  124.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  125.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__InitPartFromStorage");
  126.  
  127.     SOM_TRY
  128.         // Create the real C++ ImagePart.        
  129.         _fPart = new ImagePart;
  130.  
  131.         KSS_som_ImagePart_parent_ODPart_InitPartFromStorage(somSelf,ev,storageUnit,partWrapper);
  132.         _fPart->InitPartFromStorage(ev,storageUnit,partWrapper);
  133.     SOM_CATCH_ALL
  134.     SOM_ENDTRY
  135. }
  136.  
  137. SOM_Scope void  SOMLINK som_ImagePart__Externalize(KSS_som_ImagePart *somSelf, Environment *ev)
  138. {
  139.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  140.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Externalize");
  141.  
  142.     SOM_TRY
  143.         KSS_som_ImagePart_parent_ODPart_Externalize(somSelf,ev);
  144.         _fPart->Externalize(ev);
  145.     SOM_CATCH_ALL
  146.     SOM_ENDTRY
  147. }
  148.  
  149. SOM_Scope ODSize  SOMLINK som_ImagePart__Purge(KSS_som_ImagePart *somSelf, Environment *ev,
  150.         ODSize size)
  151. {
  152.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  153.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Purge");
  154.  
  155.     ODSize result;
  156.  
  157.     SOM_TRY
  158.         result = _fPart->Purge(ev,size);
  159.     SOM_CATCH_ALL
  160.         result = 0;
  161.     SOM_ENDTRY
  162.     
  163.     return result;
  164. }
  165.  
  166. SOM_Scope void  SOMLINK som_ImagePart__Release(KSS_som_ImagePart *somSelf, Environment *ev)
  167. {
  168.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  169.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Release");
  170.  
  171.     SOM_TRY
  172.         KSS_som_ImagePart_parent_ODPart_Release(somSelf,ev);
  173.         _fPart->Release(ev);
  174.     SOM_CATCH_ALL
  175.     SOM_ENDTRY
  176. }
  177.  
  178. SOM_Scope void  SOMLINK som_ImagePart__ReleaseAll(KSS_som_ImagePart *somSelf, Environment *ev)
  179. {
  180.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  181.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ReleaseAll");
  182.  
  183.     SOM_TRY
  184.         _fPart->ReleaseAll(ev);
  185.         KSS_som_ImagePart_parent_ODPart_ReleaseAll(somSelf,ev);
  186.     SOM_CATCH_ALL
  187.     SOM_ENDTRY
  188. }
  189.  
  190. SOM_Scope ODExtension*  SOMLINK som_ImagePart__AcquireExtension(KSS_som_ImagePart *somSelf, Environment *ev,
  191.         ODType extensionName)
  192. {
  193.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__GetExtension");
  194.  
  195.     ODExtension* result;
  196.  
  197.     SOM_TRY
  198.         // We don't support any extensions, but one of our parent classes might;
  199.         result = KSS_som_ImagePart_parent_ODPart_AcquireExtension(somSelf,ev,extensionName);
  200.     SOM_CATCH_ALL
  201.         result = kODNULL;
  202.     SOM_ENDTRY
  203.  
  204.     return result;
  205. }
  206.  
  207. SOM_Scope ODBoolean  SOMLINK som_ImagePart__HasExtension(KSS_som_ImagePart *somSelf, Environment *ev,
  208.         ODType extensionName)
  209. {
  210.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__HasExtension");
  211.  
  212.     ODBoolean result;
  213.  
  214.     SOM_TRY
  215.         // We don't support any extensions, but one of our parent classes might;
  216.         result = KSS_som_ImagePart_parent_ODPart_HasExtension(somSelf,ev,extensionName);
  217.     SOM_CATCH_ALL
  218.         result = kODFalse;
  219.     SOM_ENDTRY
  220.  
  221.     return result;
  222. }
  223.  
  224. SOM_Scope void  SOMLINK som_ImagePart__ReleaseExtension(KSS_som_ImagePart *somSelf, Environment *ev,
  225.         ODExtension* extension)
  226. {
  227.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ReleaseExtension");
  228.  
  229.     SOM_TRY
  230.         // We don't support any extensions, but one of our parent classes might;
  231.         KSS_som_ImagePart_parent_ODPart_ReleaseExtension(somSelf,ev,extension);
  232.     SOM_CATCH_ALL
  233.     SOM_ENDTRY
  234. }
  235.  
  236. SOM_Scope void  SOMLINK som_ImagePart__FulfillPromise(KSS_som_ImagePart *somSelf, Environment *ev,
  237.         ODStorageUnitView* /*promiseSUView*/)
  238. {
  239.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FulfillPromise");
  240. }
  241.  
  242. SOM_Scope void  SOMLINK som_ImagePart__DropCompleted(KSS_som_ImagePart *somSelf, Environment *ev,
  243.         ODPart* ,
  244.         ODDropResult dropResult)
  245. {
  246.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DropCompleted");
  247. }
  248.  
  249. SOM_Scope ODDragResult  SOMLINK som_ImagePart__DragEnter(KSS_som_ImagePart *somSelf, Environment *ev,
  250.         ODDragItemIterator* /*dragInfo*/,
  251.         ODFacet* /*facet*/,
  252.         ODPoint* /*where*/)
  253. {
  254.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DragEnter");
  255.  
  256.     return kODFalse;
  257. }
  258.  
  259. SOM_Scope ODDragResult  SOMLINK som_ImagePart__DragWithin(KSS_som_ImagePart *somSelf, Environment *ev,
  260.         ODDragItemIterator* /*dragInfo*/,
  261.         ODFacet* /*facet*/,
  262.         ODPoint* /*where*/)
  263. {
  264.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DragWithin");
  265.  
  266.     return kODFalse;
  267. }
  268.  
  269. SOM_Scope void  SOMLINK som_ImagePart__DragLeave(KSS_som_ImagePart *somSelf, Environment *ev,
  270.         ODFacet* /*facet*/,
  271.         ODPoint* /*where*/)
  272. {
  273.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DragLeave");
  274. }
  275.  
  276. SOM_Scope ODDropResult  SOMLINK som_ImagePart__Drop(KSS_som_ImagePart *somSelf, Environment *ev,
  277.         ODDragItemIterator* /*dropInfo*/,
  278.         ODFacet* /*facet*/,
  279.         ODPoint* /*where*/)
  280. {
  281.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Drop");
  282.  
  283.     return kODDropFail;
  284. }
  285.  
  286. SOM_Scope ODBoolean  SOMLINK som_ImagePart__RevealFrame(KSS_som_ImagePart *somSelf, Environment *ev,
  287.         ODFrame* /*embeddedFrame*/,
  288.         ODShape* /*revealShape*/)
  289. {
  290.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RevealFrame");
  291.  
  292.     return kODFalse;
  293. }
  294.  
  295. SOM_Scope ODBoolean  SOMLINK som_ImagePart__EditInLinkAttempted(KSS_som_ImagePart *somSelf, Environment *ev,
  296.         ODFrame* frame)
  297. {
  298.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__EditInLinkAttempted");
  299.  
  300.     return kODFalse;
  301. }
  302.  
  303. SOM_Scope void  SOMLINK som_ImagePart__EmbeddedFrameUpdated(KSS_som_ImagePart *somSelf, Environment *ev,
  304.         ODFrame* frame,
  305.         ODUpdateID change)
  306. {
  307.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__EmbeddedFrameChanged");
  308. }
  309.  
  310. SOM_Scope void  SOMLINK som_ImagePart__EmbeddedFrameSpec(KSS_som_ImagePart *somSelf, Environment *ev,
  311.         ODFrame* /*embeddedFrame*/,
  312.         ODObjectSpec* /*spec*/)
  313. {
  314.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__EmbeddedFrameSpec");
  315. }
  316.  
  317. SOM_Scope void  SOMLINK som_ImagePart__ContainingPartPropertiesUpdated(KSS_som_ImagePart *somSelf, Environment *ev,
  318.         ODFrame* frame,
  319.         ODStorageUnit* propertyUnit)
  320. {
  321.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ContainingPartPropertiesChanged");
  322. }
  323.  
  324. SOM_Scope ODEmbeddedFramesIterator*  SOMLINK som_ImagePart__CreateEmbeddedFramesIterator(KSS_som_ImagePart *somSelf, Environment *ev,
  325.         ODFrame* frame)
  326. {
  327.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CreateEmbeddedFramesIterator");
  328.  
  329.     // Scripting know if you part supports embedding by calling this method.
  330.     // Since we dont' support embedding, we let ODPart handle it. This is the
  331.     // only "unimplemented" method that we really have to handle.
  332.     KSS_som_ImagePart_parent_ODPart_CreateEmbeddedFramesIterator(somSelf,ev,frame);
  333.     return kODNULL;
  334. }
  335.  
  336. SOM_Scope void  SOMLINK som_ImagePart__DisplayFrameAdded(KSS_som_ImagePart *somSelf, Environment *ev,
  337.         ODFrame* frame)
  338. {
  339.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  340.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DisplayFrameAdded");
  341.  
  342.     SOM_TRY
  343.         _fPart->DisplayFrameAdded(ev,frame);
  344.     SOM_CATCH_ALL
  345.     SOM_ENDTRY
  346. }
  347.  
  348. SOM_Scope void  SOMLINK som_ImagePart__DisplayFrameRemoved(KSS_som_ImagePart *somSelf, Environment *ev,
  349.         ODFrame* frame)
  350. {
  351.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  352.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DisplayFrameRemoved");
  353.  
  354.     SOM_TRY
  355.         _fPart->DisplayFrameRemoved(ev,frame);
  356.     SOM_CATCH_ALL
  357.     SOM_ENDTRY
  358. }
  359.  
  360. SOM_Scope void  SOMLINK som_ImagePart__DisplayFrameConnected(KSS_som_ImagePart *somSelf, Environment *ev,
  361.         ODFrame* frame)
  362. {
  363.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  364.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DisplayFrameConnected");
  365.  
  366.     SOM_TRY
  367.         _fPart->DisplayFrameConnected(ev,frame);
  368.     SOM_CATCH_ALL
  369.     SOM_ENDTRY
  370. }
  371.  
  372. SOM_Scope void  SOMLINK som_ImagePart__DisplayFrameClosed(KSS_som_ImagePart *somSelf, Environment *ev,
  373.         ODFrame* frame)
  374. {
  375.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  376.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DisplayFrameClosed");
  377.  
  378.     SOM_TRY
  379.         _fPart->DisplayFrameClosed(ev,frame);
  380.     SOM_CATCH_ALL
  381.     SOM_ENDTRY
  382. }
  383.  
  384. SOM_Scope void  SOMLINK som_ImagePart__AttachSourceFrame(KSS_som_ImagePart *somSelf, Environment *ev,
  385.         ODFrame* frame,
  386.         ODFrame* sourceFrame)
  387. {
  388.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  389.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__AttachSourceFrame");
  390.  
  391.     SOM_TRY
  392.         _fPart->AttachSourceFrame(ev,frame,sourceFrame);
  393.     SOM_CATCH_ALL
  394.     SOM_ENDTRY
  395. }
  396.  
  397. SOM_Scope void  SOMLINK som_ImagePart__FrameShapeChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  398.         ODFrame* frame)
  399. {
  400.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  401.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FrameShapeChanged");
  402.  
  403.     SOM_TRY
  404.         _fPart->FrameShapeChanged(ev,frame);
  405.     SOM_CATCH_ALL
  406.     SOM_ENDTRY
  407. }
  408.  
  409. SOM_Scope void  SOMLINK som_ImagePart__ViewTypeChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  410.         ODFrame* frame)
  411. {
  412.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  413.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ViewTypeChanged");
  414.  
  415.     SOM_TRY
  416.         _fPart->ViewTypeChanged(ev,frame);
  417.     SOM_CATCH_ALL
  418.     SOM_ENDTRY
  419. }
  420.  
  421. SOM_Scope void  SOMLINK som_ImagePart__PresentationChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  422.         ODFrame* /*frame*/)
  423. {
  424.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__PresentationChanged");
  425. }
  426.  
  427. SOM_Scope void  SOMLINK som_ImagePart__SequenceChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  428.         ODFrame* /*frame*/)
  429. {
  430.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__SequenceChanged");
  431. }
  432.  
  433. SOM_Scope void  SOMLINK som_ImagePart__ClonePartInfo(KSS_som_ImagePart *somSelf, Environment *ev,
  434.         ODDraftKey key,
  435.         ODInfoType partInfo,
  436.         ODStorageUnitView* storageUnitView,
  437.         ODFrame* scopeFrame)
  438. {
  439.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  440.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ClonePartInfo");
  441.  
  442.     SOM_TRY
  443.         _fPart->ClonePartInfo(ev,key,partInfo,storageUnitView,scopeFrame);
  444.     SOM_CATCH_ALL
  445.     SOM_ENDTRY
  446. }
  447.  
  448. SOM_Scope void  SOMLINK som_ImagePart__WritePartInfo(KSS_som_ImagePart *somSelf, Environment *ev,
  449.         ODInfoType partInfo,
  450.         ODStorageUnitView* storageUnitView)
  451. {
  452.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  453.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__WritePartInfo");
  454.  
  455.     SOM_TRY
  456.         _fPart->WritePartInfo(ev,partInfo,storageUnitView);
  457.     SOM_CATCH_ALL
  458.     SOM_ENDTRY
  459. }
  460.  
  461. SOM_Scope ODInfoType  SOMLINK som_ImagePart__ReadPartInfo(KSS_som_ImagePart *somSelf, Environment *ev,
  462.         ODFrame* frame,
  463.         ODStorageUnitView* storageUnitView)
  464. {
  465.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  466.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ReadPartInfo");
  467.  
  468.     ODInfoType result;
  469.  
  470.     SOM_TRY
  471.         result = _fPart->ReadPartInfo(ev,frame,storageUnitView);
  472.     SOM_CATCH_ALL
  473.         result = kODNULL;
  474.     SOM_ENDTRY
  475.  
  476.     return result;
  477. }
  478.  
  479. SOM_Scope ODID  SOMLINK som_ImagePart__Open(KSS_som_ImagePart *somSelf, Environment *ev,
  480.         ODFrame* frame)
  481. {
  482.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  483.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Open");
  484.  
  485.     ODID result;
  486.  
  487.     SOM_TRY
  488.         result = _fPart->Open(ev,frame);
  489.     SOM_CATCH_ALL
  490.         result = kODNULLID;
  491.     SOM_ENDTRY
  492.  
  493.     return result;
  494. }
  495.  
  496. SOM_Scope ODFrame*  SOMLINK som_ImagePart__RequestEmbeddedFrame(KSS_som_ImagePart *somSelf, Environment *ev,
  497.         ODFrame* containingFrame,
  498.         ODFrame* baseFrame,
  499.         ODShape* frameShape,
  500.         ODPart* embeddedPart,
  501.         ODTypeToken viewType,
  502.         ODTypeToken presentation,
  503.         ODBoolean isOverlaid)
  504. {
  505.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RequestEmbeddedFrame");
  506.  
  507.     return kODNULL;
  508. }
  509.  
  510. SOM_Scope void  SOMLINK som_ImagePart__RemoveEmbeddedFrame(KSS_som_ImagePart *somSelf, Environment *ev,
  511.         ODFrame* /*embeddedFrame*/)
  512. {
  513.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RemoveEmbeddedFrame");
  514. }
  515.  
  516. SOM_Scope ODShape*  SOMLINK som_ImagePart__RequestFrameShape(KSS_som_ImagePart *somSelf, Environment *ev,
  517.         ODFrame* /*embeddedFrame*/,
  518.         ODShape* /*frameShape*/)
  519. {
  520.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RequestFrameShape");
  521.  
  522.     return kODNULL;
  523. }
  524.  
  525. SOM_Scope void  SOMLINK som_ImagePart__UsedShapeChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  526.         ODFrame* /*embeddedFrame*/)
  527. {
  528.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__UsedShapeChanged");
  529. }
  530.  
  531. SOM_Scope ODStorageUnit*  SOMLINK som_ImagePart__AcquireContainingPartProperties(KSS_som_ImagePart *somSelf, Environment *ev,
  532.         ODFrame* frame)
  533. {
  534.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__GetContainingPartProperties");
  535.  
  536.     return kODNULL;
  537. }
  538.  
  539. SOM_Scope ODShape*  SOMLINK som_ImagePart__AdjustBorderShape(KSS_som_ImagePart *somSelf, Environment *ev,
  540.         ODFacet* /*embeddedFacet*/,
  541.         ODShape* /*shape*/)
  542. {
  543.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__AdjustBorderShape");
  544.  
  545.     return kODNULL;
  546. }
  547.  
  548. SOM_Scope void  SOMLINK som_ImagePart__FacetAdded(KSS_som_ImagePart *somSelf, Environment *ev,
  549.         ODFacet* facet)
  550. {
  551.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  552.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FacetAdded");
  553.  
  554.     SOM_TRY
  555.         _fPart->FacetAdded(ev,facet);
  556.     SOM_CATCH_ALL
  557.     SOM_ENDTRY
  558. }
  559.  
  560. SOM_Scope void  SOMLINK som_ImagePart__FacetRemoved(KSS_som_ImagePart *somSelf, Environment *ev,
  561.         ODFacet* facet)
  562. {
  563.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  564.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FacetRemoved");
  565.  
  566.     SOM_TRY
  567.         _fPart->FacetRemoved(ev,facet);
  568.     SOM_CATCH_ALL
  569.     SOM_ENDTRY
  570. }
  571.  
  572. SOM_Scope void  SOMLINK som_ImagePart__CanvasChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  573.         ODFacet* /*facet*/)
  574. {
  575.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CanvasChanged");
  576. }
  577.  
  578. SOM_Scope void  SOMLINK som_ImagePart__GeometryChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  579.         ODFacet* facet,
  580.         ODBoolean clipShapeChanged,
  581.         ODBoolean externalTransformChanged)
  582. {
  583.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  584.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__GeometryChanged");
  585.  
  586.     SOM_TRY
  587.         _fPart->GeometryChanged(ev,facet,clipShapeChanged,externalTransformChanged);
  588.     SOM_CATCH_ALL
  589.     SOM_ENDTRY
  590. }
  591.  
  592. SOM_Scope void  SOMLINK som_ImagePart__Draw(KSS_som_ImagePart *somSelf, Environment *ev,
  593.         ODFacet* facet,
  594.         ODShape* invalidShape)
  595. {
  596.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  597.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__Draw");
  598.  
  599.     SOM_TRY
  600.         _fPart->Draw(ev,facet,invalidShape);
  601.     SOM_CATCH_ALL
  602.     SOM_ENDTRY
  603. }
  604.  
  605. SOM_Scope void  SOMLINK som_ImagePart__CanvasUpdated(KSS_som_ImagePart *somSelf, Environment *ev,
  606.         ODCanvas* /*canvas*/)
  607. {
  608.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CanvasUpdated");
  609. }
  610.  
  611. SOM_Scope void  SOMLINK som_ImagePart__HighlightChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  612.         ODFacet* facet)
  613. {
  614.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  615.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__HighlightChanged");
  616.  
  617.     SOM_TRY
  618.         _fPart->HighlightChanged(ev,facet);
  619.     SOM_CATCH_ALL
  620.     SOM_ENDTRY
  621. }
  622.  
  623. SOM_Scope ODULong  SOMLINK som_ImagePart__GetPrintResolution(KSS_som_ImagePart *somSelf, Environment *ev,
  624.         ODFrame* /*frame*/)
  625. {
  626.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__GetPrintResolution");
  627.  
  628.     return kMinImagingResolution;
  629. }
  630.  
  631. SOM_Scope ODLinkSource*  SOMLINK som_ImagePart__CreateLink(KSS_som_ImagePart *somSelf, Environment *ev,
  632.         ODByteArray* /*data*/)
  633. {
  634.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CreateLink");
  635.  
  636.     return kODNULL;
  637. }
  638.  
  639. SOM_Scope void  SOMLINK som_ImagePart__LinkUpdated(KSS_som_ImagePart *somSelf, Environment *ev,
  640.         ODLink* link,
  641.         ODUpdateID change)
  642. {
  643.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__LinkUpdated");
  644. }
  645.  
  646. SOM_Scope void  SOMLINK som_ImagePart__RevealLink(KSS_som_ImagePart *somSelf, Environment *ev,
  647.         ODLinkSource* /*linkSource*/)
  648. {
  649.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RevealLink");
  650. }
  651.  
  652. SOM_Scope void  SOMLINK som_ImagePart__LinkStatusChanged(KSS_som_ImagePart *somSelf, Environment *ev,
  653.         ODFrame* /*frame*/)
  654. {
  655.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__LinkStatusChanged");
  656. }
  657.  
  658. SOM_Scope ODBoolean  SOMLINK som_ImagePart__BeginRelinquishFocus(KSS_som_ImagePart *somSelf, Environment *ev,
  659.         ODTypeToken focus,
  660.         ODFrame* ownerFrame,
  661.         ODFrame* proposedFrame)
  662. {
  663.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  664.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__BeginRelinquishFocus");
  665.  
  666.     ODBoolean result;
  667.  
  668.     SOM_TRY
  669.         result = _fPart->BeginRelinquishFocus(ev,focus,ownerFrame,proposedFrame);
  670.     SOM_CATCH_ALL
  671.         result = kODFalse;
  672.     SOM_ENDTRY
  673.  
  674.     return result;
  675. }
  676.  
  677. SOM_Scope void  SOMLINK som_ImagePart__CommitRelinquishFocus(KSS_som_ImagePart *somSelf, Environment *ev,
  678.         ODTypeToken focus,
  679.         ODFrame* ownerFrame,
  680.         ODFrame* proposedFrame)
  681. {
  682.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  683.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CommitRelinquishFocus");
  684.  
  685.     SOM_TRY
  686.         _fPart->CommitRelinquishFocus(ev,focus,ownerFrame,proposedFrame);
  687.     SOM_CATCH_ALL
  688.     SOM_ENDTRY
  689. }
  690.  
  691. SOM_Scope void  SOMLINK som_ImagePart__AbortRelinquishFocus(KSS_som_ImagePart *somSelf, Environment *ev,
  692.         ODTypeToken focus,
  693.         ODFrame* ownerFrame,
  694.         ODFrame* proposedFrame)
  695. {
  696.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  697.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__AbortRelinquishFocus");
  698.  
  699.     SOM_TRY
  700.         _fPart->AbortRelinquishFocus(ev,focus,ownerFrame,proposedFrame);
  701.     SOM_CATCH_ALL
  702.     SOM_ENDTRY
  703. }
  704.  
  705. SOM_Scope void  SOMLINK som_ImagePart__FocusAcquired(KSS_som_ImagePart *somSelf, Environment *ev,
  706.         ODTypeToken focus,
  707.         ODFrame* ownerFrame)
  708. {
  709.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  710.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FocusAcquired");
  711.  
  712.     SOM_TRY
  713.         _fPart->FocusAcquired(ev,focus,ownerFrame);
  714.     SOM_CATCH_ALL
  715.     SOM_ENDTRY
  716. }
  717.  
  718. SOM_Scope void  SOMLINK som_ImagePart__FocusLost(KSS_som_ImagePart *somSelf, Environment *ev,
  719.         ODTypeToken focus,
  720.         ODFrame* ownerFrame)
  721. {
  722.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  723.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__FocusLost");
  724.  
  725.     SOM_TRY
  726.         _fPart->FocusLost(ev,focus,ownerFrame);
  727.     SOM_CATCH_ALL
  728.     SOM_ENDTRY
  729. }
  730.  
  731. SOM_Scope void  SOMLINK som_ImagePart__CloneInto(KSS_som_ImagePart *somSelf, Environment *ev,
  732.         ODDraftKey key,
  733.         ODStorageUnit* toSU,
  734.         ODFrame* scope)
  735. {
  736.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  737.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__CloneInto");
  738.  
  739.     SOM_TRY
  740.         KSS_som_ImagePart_parent_ODPart_CloneInto(somSelf,ev,key,toSU,scope);
  741.         _fPart->CloneInto(ev,key,toSU,scope);
  742.     SOM_CATCH_ALL
  743.     SOM_ENDTRY
  744. }
  745.  
  746. SOM_Scope void  SOMLINK som_ImagePart__ExternalizeKinds(KSS_som_ImagePart *somSelf, Environment *ev,
  747.         ODTypeList* kindset)
  748. {
  749.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  750.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ExternalizeKinds");
  751.  
  752.     SOM_TRY
  753.         _fPart->ExternalizeKinds(ev,kindset);
  754.     SOM_CATCH_ALL
  755.     SOM_ENDTRY
  756. }
  757.  
  758. SOM_Scope void  SOMLINK som_ImagePart__ChangeKind(KSS_som_ImagePart *somSelf, Environment *ev,
  759.         ODType kind)
  760. {
  761.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  762.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__ChangeKind");
  763.  
  764.     SOM_TRY
  765.         _fPart->ChangeKind(ev,kind);
  766.     SOM_CATCH_ALL
  767.     SOM_ENDTRY
  768. }
  769.  
  770. SOM_Scope ODBoolean  SOMLINK som_ImagePart__HandleEvent(KSS_som_ImagePart *somSelf, Environment *ev,
  771.         ODEventData* event,
  772.         ODFrame* frame,
  773.         ODFacet* facet,
  774.         ODEventInfo* eventInfo)
  775. {
  776.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  777.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__HandleEvent");
  778.  
  779.     ODBoolean result;
  780.  
  781.     SOM_TRY
  782.         result = _fPart->HandleEvent(ev,event,frame,facet,eventInfo);
  783.     SOM_CATCH_ALL
  784.         result = kODFalse;
  785.     SOM_ENDTRY
  786.  
  787.     return result;
  788. }
  789.  
  790. SOM_Scope void  SOMLINK som_ImagePart__AdjustMenus(KSS_som_ImagePart *somSelf, Environment *ev,
  791.         ODFrame* frame)
  792. {
  793.     KSS_som_ImagePartData *somThis = KSS_som_ImagePartGetData(somSelf);
  794.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__AdjustMenus");
  795.  
  796.     SOM_TRY
  797.         _fPart->AdjustMenus(ev,frame);
  798.     SOM_CATCH_ALL
  799.     SOM_ENDTRY
  800. }
  801.  
  802. SOM_Scope void  SOMLINK som_ImagePart__UndoAction(KSS_som_ImagePart *somSelf, Environment *ev,
  803.         ODActionData* /*actionState*/)
  804. {
  805.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__UndoAction");
  806. }
  807.  
  808. SOM_Scope void  SOMLINK som_ImagePart__RedoAction(KSS_som_ImagePart *somSelf, Environment *ev,
  809.         ODActionData* /*actionState*/)
  810. {
  811.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__RedoAction");
  812. }
  813.  
  814. SOM_Scope void  SOMLINK som_ImagePart__DisposeActionState(KSS_som_ImagePart *somSelf, Environment *ev,
  815.         ODActionData* ,
  816.         ODDoneState doneState)
  817. {
  818.     KSS_som_ImagePartMethodDebug("KSS_som_ImagePart","som_ImagePart__DisposeActionState");
  819. }
  820.